import request from '@/config/axios'

export interface MsgSendLogVO {
        id: number
        msgType: number
        sendType: number
        toUserList: string
        sender: string
        content: string
        msgid: string
}

// 查询消息记录列表
export const getMsgSendLogPage = async (params) => {
    return await request.get({url: `/wecom/msg-send-log/page`, params})
}

// 查询消息记录详情
export const getMsgSendLog = async (id: number) => {
    return await request.get({url: `/wecom/msg-send-log/get?id=` + id})
}

// 新增消息记录
export const createMsgSendLog = async (data: MsgSendLogVO) => {
    return await request.post({url: `/wecom/msg-send-log/create`, data})
}

// 修改消息记录
export const updateMsgSendLog = async (data: MsgSendLogVO) => {
    return await request.put({url: `/wecom/msg-send-log/update`, data})
}

// 删除消息记录
export const deleteMsgSendLog = async (id: number) => {
    return await request.delete({url: `/wecom/msg-send-log/delete?id=` + id})
}

// 导出消息记录 Excel
export const exportMsgSendLog = async (params) => {
    return await request.download({url: `/wecom/msg-send-log/export-excel`, params})
}

// 查询发送结果
export const getSendResult = async (params) => {
    return await request.get({url: `/wecom/msg-send-log/get-send-result`, params})
}

// 新增消息记录
export const getCustomerMap = async (data) => {
    return await request.post({url: `/wecom/we-customer/get-customer-map`, data})
}
// 新增消息记录
export const getChatMap = async (data) => {
    return await request.post({url: `/wecom/we-chat-group/get-chat-map`, data})
}